package com.pig4cloud.pigx.user.mongo.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.pig4cloud.pigx.common.customize.contants.MongoTableNameConstants;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * Api封禁时长配置mongo
 *
 * @since 2022/10/31 16:10
 */
@Data
@Document(MongoTableNameConstants.USER_API_LOCK_DURATION)
public class UserApiLockDurationMongo implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@Id
	private Long id;

	/**
	 * 封禁次数
	 */
	private Integer lockNum;

	/**
	 * 封禁时长
	 */
	private Integer duration;

	/**
	 * 创建时间
	 */
	private LocalDateTime createTime;

	/**
	 * 创建人
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long createBy;

	/**
	 * 创建人名称
	 */
	private String createName;

	/**
	 * 修改时间
	 */
	private LocalDateTime updateTime;

	/**
	 * 修改人
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long updateBy;

	/**
	 * 修改人名称
	 */
	private String updateName;

	/**
	 * 状态（目前无意义）
	 */
	private String status;

	/**
	 * 是否删除（0否、null是）
	 */
	private String isDeleted;

}
